#!/usr/bin/env bash
debug=0
values=2

saida="End. IP  : 10.0.0.1
Mascara  : 255.255.255.0 = 24
Rede     : 10.0.0.0 / 24
Broadcast: 10.0.0.255"

tests=(
''	''	r	^Uso:.*

a	''	r	"IP inv.lido: a"
0.0.0	''	r	"IP inv.lido: .*"
0.0	''	r	"IP inv.lido: .*"
0	''	r	"IP inv.lido: .*"
0.0.0.256	''	r	"IP inv.lido: .*"

10.0.0.0	a	r	"M.scara inv.lida: a"
10.0.0.0	-1	r	"M.scara inv.lida: .*"
10.0.0.0	33	r	"M.scara inv.lida: .*"
10.0.0.0	0.0.0	r	"M.scara inv.lida: .*"
10.0.0.0	0.0	r	"M.scara inv.lida: .*"
10.0.0.0	0.0.0.256	r	"M.scara inv.lida: .*"
10.0.0.0/33	''	r	"M.scara inv.lida: .*"
10.0.0.0/0.0.0.256	''	r	"M.scara inv.lida: .*"

10.0.0.1	''	t	"$saida"
10.0.0.1/24	''	t	"$saida"
10.0.0.1	24	t	"$saida"
10.0.0.1	255.255.255.0	t	"$saida"
10.0.0.1/255.255.255.0	''	t	"$saida" # nao documentada
)
. _lib
